package com.yiqi.zhiyuan.feature.order.contract;

import com.suozhang.framework.entity.bo.PageData;
import com.suozhang.framework.framework.BasePresenter;
import com.suozhang.framework.framework.BaseView;
import com.yiqi.zhiyuan.entity.dto.ChangeOrderDTO;
import com.yiqi.zhiyuan.entity.vo.ChangeReasonVO;
import com.yiqi.zhiyuan.entity.vo.FileVO;
import com.yiqi.zhiyuan.entity.vo.OrderVO;

import java.util.List;

import io.reactivex.Observable;

/**
 * @ProjectName: ZhiYuan
 * @Description: java类作用描述
 * @Author: lijuwen
 * @CreateDate: 2019/3/14 10:45
 * @UpdateUser: 更新者
 * @UpdateDate: 2019/3/14 10:45
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
public interface ChangeContract {

    interface Model {

        /**
         * 获取改派原因
         *
         * @param
         * @return
         */
        Observable<List<ChangeReasonVO>> doSelectChangeReason();

        /**
         * 上传图片
         *
         * @param
         * @return
         */
        Observable<FileVO> doUploadImage(String imageUrl);

        /**
         * 订单改派
         */
        Observable<String> doChangeOrder(ChangeOrderDTO orderDTO);

    }

    interface View extends BaseView {
        /**
         * 获取改派原因成功
         *
         * @param
         */
        void showChangeReasonSuccess(List<ChangeReasonVO> data);

        /**
         * 获取改派原因失败
         *
         * @param
         */
        void showChangeReasonError(String errorMsg);

        /**
         * 上传图片成功
         *
         * @param
         */
        void showUploadImageSuccess(String imageUrl);

        /**
         * 上传图片失败
         *
         * @param
         */
        void showUploadImageError(String errorMsg);


        /**
         * 改派成功
         *
         * @param
         */
        void showChangeOrderSuccess();

        /**
         * 改派失败
         *
         * @param errorMsg
         */
        void showChangeOrderError(String errorMsg);
    }

    interface Presenter extends BasePresenter {

        /**
         * 上传图片
         *
         * @param
         * @return
         */
        void uploadImage(String imageUrl);

        void selectChangeReason();

        void changeOrder(int useCarType,
                         String orderNo,
                         String reason,
                         String explain,
                         List<String> imgList);
    }


}